<html>
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $this->config_model->item('site_name')." - ".$title; ?></title>
    <link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="<?php echo base_url();?>assets/bootstrap/css/bootstrap.css">
    
    <link rel="stylesheet" href="<?php echo base_url();?>assets/css/style.css">

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>assets/bootstrap/js/bootstrap.js"></script>
    <link type="text/css" href="<?php echo base_url();?>assets/css/custom-theme/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>

    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-1632660-13']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
    
  </head>
  <body>

      
    <div class='container'>
      <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
          <div class="container">
                <a class="brand" href="<?php echo base_url();?>">
                  <?php echo $this->config_model->item('site_name'); ?>
                </a>
                <ul class="nav pull-left">
                  <li><?php echo anchor('stages', lang('stages'));?></li>
                  <li><?php echo anchor('ranking/overall', lang('ranking'));?></li>
                  <?php if ($this->ion_auth->logged_in())
                  {
                  ?>  
                  <li><?php echo anchor('info/user_teams/'.$user->id, lang('your_team'));?></li>
                  <?php } ?>
                  <li><?php echo anchor('rules', ucwords(lang('the_rules'))); ?></li>
                </ul>
                <?php if($this->ion_auth->logged_in()) { ?>
                <ul class="nav pull-right">
                  <?php
                  if(isset($help_message_text))
                  {
                  ?>
                  <li><a data-toggle="modal" href="#myModal">Help</a></li>
                  <?php
                  }
                  ?>                  
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="icon-user icon-white"> </i> <?php echo $user->username;?>
                    <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                      <li><?php echo anchor('auth/logout','Log Out'); ?></li>
                      <li class='divider'></li>
                      <li><?php if($this->ion_auth->is_admin()) { echo anchor('admin', 'Beheer'); }?> </li>
                    </ul>
                  </li>

                </ul>
                <?php
                }
                 ?>
          </div>
        </div>
      </div>

      <?php if ($this->session->flashdata('message')) { ?>
        <div class="alert alert-block">
          <a class="close" data-dismiss="alert" href="#">×</a>
          <h4 class="alert-heading"><?php echo lang('message');?></h4>
          <p><?php echo $this->session->flashdata('message');?></p>
        </div>
      <?php } ?>
        
      <!-- start specific view -->
      <?php $this->load->view($view); ?>
      <!-- end specific view -->

        <div class="navbar navbar-fixed-bottom">
          <div class="navbar-inner">
            <div class="container">
              <p class="navbar-text">Gebruikers: <?php echo number_of_users();?></p>
            </div>
          </div>
        </div>

    <div class="modal hide" id="myModal">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">×</button>
        <h3><?php echo lang($help_message_title);?></h3>
      </div>
      <div class="modal-body">
        <p><?php echo lang($help_message_text);?></p>
      </div>
      <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal"><?php echo lang('close');?></a>
      </div>
    </div>
     
  <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/functions.js"></script>
  </body>
</html>    
